ActionRow

A [class@Gtk.ListBoxRow] used to present actions.

<picture> <source srcset="action-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="action-row.png" alt="action-row"> </picture>

The AdwActionRow widget can have a title, a subtitle and an icon. The row can receive additional widgets at its end, or prefix widgets at its start.

It is convenient to present a preference and its related actions.

AdwActionRow is unactivatable by default, giving it an activatable widget will automatically make it activatable, but unsetting it won't change the row's activatability.

AdwActionRow as GtkBuildable

The AdwActionRow implementation of the [iface@Gtk.Buildable] interface supports adding a child at its end by specifying “suffix” or omitting the “type” attribute of a <child> element.

It also supports adding a child as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.

CSS nodes

AdwActionRow has a main CSS node with name row.

It contains the subnode box.header for its main horizontal box, and box.title for the vertical box containing the title and subtitle labels.

It contains subnodes label.title and label.subtitle representing respectively the title label and subtitle label.

Constructors

this
this(AdwActionRow* adwActionRow, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new AdwActionRow.

Members

Functions

activate
bool activate()

Activates @self.

addOnActivated
gulong addOnActivated(void delegate(ActionRow) dlg, ConnectFlags connectFlags)

This signal is emitted after the row has been activated.

addPrefix
void addPrefix(Widget widget)

Adds a prefix widget to @self.

addSuffix
void addSuffix(Widget widget)

Adds a suffix widget to @self.

getActionRowStruct
AdwActionRow* getActionRowStruct(bool transferOwnership)

Get the main Gtk struct

getActivatableWidget
Widget getActivatableWidget()

Gets the widget activated when @self is activated.

getIconName
string getIconName()

Gets the icon name for @self.

getStruct
void* getStruct()

the main Gtk struct as a void*

getSubtitle
string getSubtitle()

Gets the subtitle for @self.

getSubtitleLines
int getSubtitleLines()

Gets the number of lines at the end of which the subtitle label will be ellipsized.

getTitleLines
int getTitleLines()

Gets the number of lines at the end of which the title label will be ellipsized.

remove
void remove(Widget widget)

Removes a child from @self.

setActivatableWidget
void setActivatableWidget(Widget widget)

Sets the widget to activate when @self is activated.

setIconName
void setIconName(string iconName)

Sets the icon name for @self.

setSubtitle
void setSubtitle(string subtitle)

Sets the subtitle for @self.

setSubtitleLines
void setSubtitleLines(int subtitleLines)

Sets the number of lines at the end of which the subtitle label will be ellipsized.

setTitleLines
void setTitleLines(int titleLines)

Sets the number of lines at the end of which the title label will be ellipsized.

Static functions

getType
GType getType()

Variables

adwActionRow
AdwActionRow* adwActionRow;

the main Gtk struct

Inherited Members

From PreferencesRow

adwPreferencesRow
AdwPreferencesRow* adwPreferencesRow;

the main Gtk struct

getPreferencesRowStruct
AdwPreferencesRow* getPreferencesRowStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getTitle
string getTitle()

Gets the title of the preference represented by @self.

getTitleSelectable
bool getTitleSelectable()

Gets whether the user can copy the title from the label

getUseUnderline
bool getUseUnderline()

Gets whether an embedded underline in the title indicates a mnemonic.

setTitle
void setTitle(string title)

Sets the title of the preference represented by @self.

setTitleSelectable
void setTitleSelectable(bool titleSelectable)

Sets whether the user can copy the title from the label

setUseUnderline
void setUseUnderline(bool useUnderline)

Sets whether an embedded underline in the title indicates a mnemonic.

Meta